package com.ruoyi.mall.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.mapper.OrderBanchMapper;
import com.ruoyi.mall.domain.OrderBanch;
import com.ruoyi.mall.service.IOrderBanchService;

/**
 * 盲盒批量订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-13
 */
@Service
public class OrderBanchServiceImpl implements IOrderBanchService 
{
    @Autowired
    private OrderBanchMapper orderBanchMapper;

    /**
     * 查询盲盒批量订单
     * 
     * @param id 盲盒批量订单主键
     * @return 盲盒批量订单
     */
    @Override
    public OrderBanch selectOrderBanchById(String id)
    {
        return orderBanchMapper.selectOrderBanchById(id);
    }

    /**
     * 查询盲盒批量订单列表
     * 
     * @param orderBanch 盲盒批量订单
     * @return 盲盒批量订单
     */
    @Override
    public List<OrderBanch> selectOrderBanchList(OrderBanch orderBanch)
    {
        return orderBanchMapper.selectOrderBanchList(orderBanch);
    }

    /**
     * 新增盲盒批量订单
     * 
     * @param orderBanch 盲盒批量订单
     * @return 结果
     */
    @Override
    public int insertOrderBanch(OrderBanch orderBanch)
    {
        orderBanch.setCreateTime(DateUtils.getNowDate());
        return orderBanchMapper.insertOrderBanch(orderBanch);
    }

    /**
     * 修改盲盒批量订单
     * 
     * @param orderBanch 盲盒批量订单
     * @return 结果
     */
    @Override
    public int updateOrderBanch(OrderBanch orderBanch)
    {
        orderBanch.setUpdateTime(DateUtils.getNowDate());
        return orderBanchMapper.updateOrderBanch(orderBanch);
    }

    /**
     * 批量删除盲盒批量订单
     * 
     * @param ids 需要删除的盲盒批量订单主键
     * @return 结果
     */
    @Override
    public int deleteOrderBanchByIds(String[] ids)
    {
        return orderBanchMapper.deleteOrderBanchByIds(ids);
    }

    /**
     * 删除盲盒批量订单信息
     * 
     * @param id 盲盒批量订单主键
     * @return 结果
     */
    @Override
    public int deleteOrderBanchById(String id)
    {
        return orderBanchMapper.deleteOrderBanchById(id);
    }
}
